#!/usr/bin python3
# -*- coding:UTF-8 -*-
# Author: nigo
import plotly.graph_objects as go
import pandas as pd

# 数据
df = pd.read_clipboard(delimiter='\s+',thousands=',')
# 轨迹
waterfall = go.Waterfall(orientation="h",measure=df['样式'],y=df['项目'],x=df['金额'])
# 画布
fig = go.Figure(waterfall)
# 更新样式
fig.update_layout(title='2020年利润表',xaxis_tickformat=',.2r')
# 显示画布
fig.show()

